package org.onion.pattern.sample.active.service.event;

import com.github.f4b6a3.uuid.UuidCreator;
import org.onion.pattern.event.outbox.annotation.Outbox;
import org.onion.pattern.event.domain.Event;
import org.onion.pattern.event.springboot.rocketmq.annotation.RocketMQEvent;

import java.time.LocalDateTime;

@Outbox
@RocketMQEvent("ActCrateEventII")
public class ActCrateEventII implements Event {

    @Override
    public String eventKey() {
        return UuidCreator.getTimeOrderedEpoch().toString();
    }

    @Override
    public LocalDateTime eventTime() {
        return LocalDateTime.now();
    }
}
